package com.bing.habit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bing.habit.entity.ClockinRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ClockinRecordDAO extends BaseMapper<ClockinRecord> {

    List<ClockinRecord> findAllByUid(@Param("uid") int uid);

    List<ClockinRecord> listToday(@Param("hid") int hid);//查询今天

    ClockinRecord listTodayIn(@Param("hid") int hid);//查询今天

    //查找本周 1-0 list
    List<Integer> listWeeks(@Param("hid") int hid);


    //根据月份查询  '2020-07'
    List<ClockinRecord> listMonths(@Param("hid") int hid, @Param("date") String date);

    //查询某一天 '2020-07-18'
    List<ClockinRecord> listDay(@Param("hid") int hid,@Param("date") String date);

}
